home *** CD-ROM | disk | FTP | other *** search
/ Shareware Grab Bag / Shareware Grab Bag.iso / 009 / smartrm1.arc / STFIXON.ASM < prev    next >
Encoding:
Assembly Source File  |  1985-12-27  |  1.5 KB  |  48 lines

  1.     page    60,132
  2. TITLE    STFIXON -  Turn STFIX.COM on or off
  3. ;-------------------------------------------------------------------
  4. ;
  5. ;    This routine toggles STFIX.COM on or off.  When STFIX is on,
  6. ;    SMARTERM 100 (ST100.EXE) can be run without the original disk.
  7. ;    For SMARTERM 100 ver. 4.0c
  8. ;
  9. ;    by Keith M. Bailey        12/29/85     version 4.0c
  10. ;
  11. ;-------------------------------------------------------------------
  12. CODESG    SEGMENT
  13.     ASSUME CS:CODESG,DS:NOTHING,ES:NOTHING
  14.     ORG    0100H
  15. STFIXON    PROC    FAR
  16. START:    MOV    AX,00
  17.     MOV    DS,AX            ;Set DS to 0000
  18.     MOV    DX,OFFSET NOSTFIX    ;Point to error message
  19.     LDS    SI,DS:[13H*4]        ;Point to INT 13H
  20.     CMP    WORD PTR DS:[SI],9CFBH    ;Is STFIX installed ?
  21.     JNE    DONE            ;   No
  22.     CMP    WORD PTR DS:[SI+2],0FC80H
  23.     JNE    DONE            ;   No
  24.     MOV    AL,BYTE PTR DS:[SI-1]    ;Get flag from STFIX
  25.     NOT    AL            ;Toggle flag
  26.     MOV    BYTE PTR DS:[SI-1],AL    ;Store flag back in STFIX
  27.     CMP    AL,00            ;Is flag = 00 ?
  28.     JE    OFF            ;   Yes - print off message
  29.  
  30.     MOV    DX,OFFSET MSSGON    ;Point to ON message
  31.     JMP    DONE
  32.  
  33. OFF:    MOV    DX,OFFSET MSSGOFF    ;Point to OFF message
  34.  
  35. DONE:    MOV    AX,CS            ;DS:DX points to string
  36.     MOV    DS,AX
  37.     MOV    AH,09H
  38.     INT    21H            ;Print string
  39.     INT    20H            ;Terminate
  40.  
  41. NOSTFIX    DB    0DH,0AH,'STFIX must be resident before this routine is run.',0DH,0AH,'$'
  42. MSSGON    DB    0DH,0AH,'Resident program to trap for ST100.EXE is ON.',0DH,0AH,'$'
  43. MSSGOFF    DB    0DH,0AH,'Resident program to trap for ST100.EXE is OFF.',0DH,0AH,'$'
  44.  
  45. STFIXON    ENDP
  46. CODESG    ENDS
  47.     END    STFIXON
  48.